package ch.prokopovi.provider.places;

import java.util.List;
import java.util.Map.Entry;

import android.test.AndroidTestCase;
import ch.prokopovi.api.provider.PlacesProvider;
import ch.prokopovi.api.struct.BestRatesRecord;
import ch.prokopovi.err.WebUpdatingException;
import ch.prokopovi.provider.places.MoneyPointMdPlacesProvider;
import ch.prokopovi.struct.Master.Region;

public class MoneyPointMdProviderTest extends AndroidTestCase {

    private static final String LOG_TAG = "MoneyPointMdProviderTest";

    private PlacesProvider provider;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        this.provider = new MoneyPointMdPlacesProvider();
    }

    public void testUpdate() throws WebUpdatingException {

        List<Entry<Long, BestRatesRecord>> places = this.provider.getPlaces(Region.CHISINAU);

        assertNotNull("result is null", places);
        assertTrue("result is empty", places.size() > 0);
    }

}
